<template>
   <div style="width: 600px;height: 400px">
            <Cropper 
                :enable-cut="false"
                :default-cut-height="200"
                :default-cut-width="200"
                :origin-image="defaultImg" @getImg="getImg"></Cropper>
   </div>
   <img :src="cutImg" />
</template>

<script setup lang="ts">
    import { ref } from "vue";
    import Cropper from "./component/Cropper.vue";
    import dogImage from "@/assets/whiteDog.jpg";
    //  推荐使用blob或base64类型的图片
    const defaultImg = ref(dogImage)

    const cutImg = ref(dogImage);

    const getImg = (base64: string) => {
        cutImg.value = base64
    }
</script>

